<form id="search-form" class="form-inline" role="form" action="{{queryPath}}" method="get">
	<input type="text" id="so_fieldName" value="{{filterValue}}" class="col-md-7 inline-form-control">
	<select class="col-md-3 inline-form-control" id="so_filterField">
		{{#filterFields}}
		<option value="{{key}}" {{#selected}}selected{{/selected}}>{{value}}</option>
		{{/filterFields}}
	</select>
	<input id="so_go" class="col-md-2 btn btn-success" type="submit" value="查找"/>
	<div class="btn-group">
	{{#sortInfo}}
	  <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
	    <span class="sr-only">排序：{{currentSortEntry.text}}
	    {{^noneSortEntry}}
		    {{#currentSortEntry.asc}}↑{{/currentSortEntry.asc}}
		    {{^currentSortEntry.asc}}↓{{/currentSortEntry.asc}}
	    {{/noneSortEntry}}
	    </span>
	    <span class="caret"></span>
	  </button>
	  <ul class="dropdown-menu" role="menu">
	  	{{#sortEntrys}}
	    <li>
	    	<a href="?st_{{name}}={{nextDir}}{{#filterExp}}&{{filterExp}}{{/filterExp}}">
	    	{{text}} 
	    	{{#selected}}
		    	{{#nextAsc}}↑{{/nextAsc}}
		    	{{^nextAsc}}↓{{/nextAsc}}
	    	{{/selected}}
	    	</a>
	    </li>
	    {{/sortEntrys}}
	  </ul>
	{{/sortInfo}}
	</div>
</form>
   <script type="text/javascript">
   $(document).ready(function() {
   	var txtFieldName=$("#so_fieldName"), selFilterField=$("#so_filterField");
   	selFilterField.on("change", function(evt){
		 var selected=$(this).children('option:selected');
		 var name=selected.val();
		 txtFieldName.attr('name',name);
	});
	selFilterField.trigger("change");
   });
   </script>